;cartstackAPI.bReady=!1;window.console=typeof window.console==='undefined'?{log:function(t){return!1}}:window.console;function cs_crossDomain(t){if(xe_isset(cartstackAPI.crossDomain)){return!1};cartstackAPI.crossDomain=!0;cs_console.log('Setting up cross domain for domain: '+t);document.cookie.split(';').reduce((cookies,cookie)=>{var[name,value]=cookie.split('=').map(c=>c.trim());if(name.indexOf('xe_xdm-')>-1)document.cookie=name+'=;expires=Thu, 01 Jan 1970 00:00:01 GMT;'},{})};var cs_debug=(xe_readCookie('cs_debug')!='')?!0:!1;window.cs_console={log:function(t){return!1}};var _siteid='h49fj5V6aA==',_domain='.colibrifestas.com.br',_dguid='2D77AF1F-FAE6-013B-FC15-D3042F8A954B',cs_ref_policy=!1,_wpathname=decodeURIComponent(window.location.pathname);_wpathname=_wpathname.replace(/\/+$/,'').split('/').reverse()[0].toLowerCase().trim();var __ref='';try{__ref=decodeURIComponent('https://www.colibrifestas.com.br/?srsltid=afmboopy-yk6w0j8x7u4rvg93dii6j1vntko1vfwg8rn9u9fyv6gh3ml&utm_source=google_organic&utm_content=%7c%7cnemu_mlxkn1ff9r')}catch(t$){__ref='https://www.colibrifestas.com.br/?srsltid=afmboopy-yk6w0j8x7u4rvg93dii6j1vntko1vfwg8rn9u9fyv6gh3ml&utm_source=google_organic&utm_content=%7c%7cnemu_mlxkn1ff9r'};cs_ref_policy=(__ref.indexOf(_wpathname)==-1)?!0:!1;cs_debug&&console.log((cs_ref_policy)?'No referrer was sent, we need to reload!':'Referrer OK!');cs_console.log((cs_ref_policy)?'No referrer was sent, we need to reload!':'Referrer OK!');if(!cs_ref_policy){var cs_avoidCall=!1;function avoidCall(){cs_avoidCall=!0;return!0};function cs_include(){return!1};cs_console.log('CartStack PRO');var cs_pro=!0,cs_event='capture',_cartstack_pro=_cartstack_pro||[],cs_proLoaded=!1;function csPROGenProductID(t){t=(t&&typeof t==='string')?t.toLowerCase().trim():t;t=(t&&typeof t==='number')?parseInt(t):t;var r=decodeURIComponent(window.location.pathname.replace(/\/+$/,''));r=(r[0]!='/')?'/'+r:r;r=(r.substr(r.length-2)=='/p')?r.substr(0,r.length-2):r;t=(typeof t!='undefined')?r.split('/').reverse()[((typeof t==='number')?t:0)].toLowerCase().trim():t;var n='ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž',d='AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz';t=t.split('');var s=t.length,c,a;for(c=0;c=10)?parseInt(e['1'])-10:e['1']):e['1']};return e['2']};e.getHashCode=function(t){var e=0,c=(typeof t=='string')?t.length:0,r=0;while(r1)?!1:!0;var d=cs_apiRequestDiff('cart_update','days');r=(!r&&d===!1||d>1)?!1:!0;(cs_debug&&r)&&console.log('[CartStack] PRO - @csPROHit, Cart already sent... checking for a valid cart...');var n=cs_apiRequestDiff('strictcart','days');r=(r&&(n!==!1&&n===0))?!0:!1;(cs_debug&&r)&&console.log('[CartStack] PRO - @csPROHit, Cart already sent!');if(!cs_proLoaded&&!r&&(window.location.pathname!='/'||xe_isset(cs_home_bypass,'boolean'))&&s!=''){cs_proLoaded=!0;cs_debug&&console.log('[CartStack] PRO - @csPROHit, Init');cs_debug&&console.log('[CartStack] PRO - @csPROHit, Extra data: '+((t!==!1)?JSON.stringify(t):'false'));var i=xe_readCookie('cartstack.com-bwrid');if(isNaN(i)){i='';xe_deleteCookie('cartstack.com-bwrid')};var a={'domain':((typeof cs_pro_domain!=='undefined')?cs_pro_domain:_domain)};if(t!==!1&&typeof t==='object'){a.extra=JSON.stringify(t)} else{a.query=(t&&typeof t=='string'&&t!='')?t:'id='+csPROGenProductID(t)};e=(e!==!1)?'&imgt='+encodeURIComponent(window.btoa(JSON.stringify(e))):'';gmpd_alias=(gmpd_alias!==!1)?'&gmpd_alias='+gmpd_alias:'';cs_debug&&console.log('[CartStack] PRO - @csPROHit, Data.query: '+((typeof a.extra!='undefined')?a.extra:a.query));var u=encodeURIComponent(window.btoa(JSON.stringify(a)))+String(e)+String(gmpd_alias)+((cs_debug)?'&cartstacktest=true':'');_cartstack_pro.push(['setSiteID',_siteid]);_cartstack_pro.push(['setEmail',s]);if(i!='')_cartstack_pro.push(['setBrowseID',i]);_cartstack_pro.push(['setLocation','br']);_cartstack_pro.push(['setShowAlert',cs_debug]);var o=document.createElement('script');o.type='text/javascript';o.async=!0;o.src=document.location.protocol+'//app.cartstack.com.br/activeAPI/cnct/pro_rc.js?data='+u;(document.head||document.getElementsByTagName('head')[0]).appendChild(o)} else{(cs_debug&&s=='')&&console.log('[CartStack] PRO - @csPROHit, Not satisfactory send')}};if(typeof _cartstack=='undefined'||!(_cartstack instanceof Array))var _cartstack=[];var cs_datatunnel=!1;cs_datatunnel=!0;_cartstack.push(['setDataItem',{'account_number':'19728'}]);_cartstack.push(['setDataItem',{'platform_carturl':'/checkout/?utm_source=CartStack&utm_medium=Email&utm_campaign=CarrinhoAbandonado#/cart'}]);var _cartstack=_cartstack||[];if(typeof multipleStoresXDomain!='function'||(typeof multipleStoresXDomain==='function'&&!multipleStoresXDomain()))_cartstack.push(['setSiteID','h49fj5V6aA==']);_cartstack.push(['setAPI','capture']);_cartstack.push(['setLocation','br']);cs_debug&&console.log('[CartStack] csCart - Loaded!');function _csCartItem(){var t=Array.prototype.slice.call(arguments),e=this;Object.keys(t[0]).forEach(function(r){var c=r,a=t[0][r];e[c]=a});this.totalPrice=function(){return(this.priceFloat>0.1)?this.priceFloat*this.quantity:0};return this};window._csCart={_cartstack:[],helper:{_cartstackFind:function(t,e,r){var o=0,a=!1;e=(this.isset(e,'boolean')&&e)?!0:!1;r=(typeof r!=='undefined'&&r!==null)?r:_csCart._cartstack;for(var c=0;c]+(>|$)/g,'');t=t.replace(/\s+/g,' ');t=t.replace(' ',' ');return t},replaceAll:function(t,e,r,c){r=this.fixStr(r);r=(r!='')?r.replace(new RegExp(t,'g'),e):!1;r=(r===!1)?c:r;return r},toFloat:function(t){t=this.fixStr(t);function e(t){if(parseInt(t)!='NaN'){t=parseFloat(t)+0;return(/[.]/.test(t)&&!/[,]/.test(t))};return!1};if(t==''||(/[.]/.test(t)&&!/[,]/.test(t)))return t;t=t.replace(/[^0-9,.]/g,'',t);t=(/[.]/.test(t)&&/[,]/.test(t))?t.replace('.','').replace(',','.',t):((!e(t))?t.replace(',','.',t.replace('.','',t)):t);return t},toCurrency:function(t){var c=null,e=null,r=null,a=null,o=[];t=''+t;r=t.indexOf('.',0);if(r>0){c=t.substring(0,r);e=t.substring(r+1,t.length)} else{c=t};for(a=c.length,r=0;a>0;a-=3,r++){o[r]=c.substring(a-3,a)};c='';for(r=o.length-1;r>=0;r--){c+=o[r]+'.'};c=c.substring(0,c.length-1);e=parseInt(e);if(isNaN(e)){e='00'} else{e=''+e;if(e.length===1){e=e+'0'}};t=c+','+e.substr(0,2);return t},parseURL:function(t){var e=document.createElement('a'),o={},c,a,r;e.href=t;c=e.search.replace(/^\?/,'').split('&');for(r=0;r-1)?t:((t[0]=='/'&&t[1]=='/')?_csCart.helper.getProtocol()+t:_csCart.helper.getDomain()+((t[0]=='/')?t:'/'+t));this.item.productURL=_csCart.helper.fixStr(t);if(e&&typeof e!=='undefined'){this.item.dataTransform=e}},setImageURL:function(t,e,r){e=(_csCart.helper.isset(e,'boolean'))?e:!0;if(this.item==!1||!_csCart.helper.isset(t,'string'))return!1;if(e){t=(t.toLowerCase().indexOf('http')>-1)?t:((t[0]=='/'&&t[1]=='/')?_csCart.helper.getProtocol()+t:_csCart.helper.getDomain()+((t[0]=='/')?t:'/'+t))};this.item.productImageURL=_csCart.helper.fixStr(t);if(r&&typeof r!=='undefined'){this.item.dataTransform=r}},setImageWidth:function(t){this.item.imageWidth=(t=='')?'100':t},setPrice:function(t){if(this.item==!1||!_csCart.helper.isset(t))return!1;this.item.productPrice=_csCart.helper.replaceAll('[^0-9.,]+','',t,((t==-1)?'':'Consulte'))},setButtonText:function(t){if(this.item==!1||!_csCart.helper.isset(t,'string'))return!1;this.item.viewProductLinkText=_csCart.helper.stripHTML(t)},setCallback:function(t,e){if(this.item==!1||!_csCart.helper.isset(t,'string')||typeof e!=='function')return!1;this.item[t]=!1;this.callbacks[t]=e}},clearItems:function(){_csCart._cartstack=[]},hasCart:function(){var t=xe_readCookie('cartstack.com-cart')||!1;return(t===!1)?0:parseInt(t)},createProduct:function(){this.product.item={}},addProduct:function(){var e=this.product.def_item,r=[],t=!0;Object.keys(this.product.item).forEach(function(r){var a=r,c=_csCart.product.item[r],o=_csCart.product.item.dataTransform;t=!0;switch(a){case'quantity':t=(parseInt(c)!='NaN')?!0:!1;e.quantity=(t)?c:e.quantity;break;case'productName':t=(c.length>=3)?!0:!1;c=(t)?c:e.productName;e.productName=_csCart.helper.dataTransform(c,o);break;case'productDescription':t=(c.length>3)?!0:!1;c=(t)?c:e.productDescription;e.productDescription=_csCart.helper.dataTransform(c,o);break;case'productURL':t=(c==''||c.toLowerCase().indexOf('http')>-1)?!0:!1;c=(t)?c:e.productURL;e.productURL=_csCart.helper.dataTransform(c,o);break;case'productImageURL':t=(c==''||c.toLowerCase().indexOf('http')>-1)?!0:!1;c=(t)?c:e.productImageURL;e.productImageURL=_csCart.helper.dataTransform(c,o);break;case'productPrice':t=(/[.]/.test(c)||/[,]/.test(c))?!0:!1;e.productPrice=(t)?c:e.productPrice;e.priceFloat=(e.productPrice!='Consulte')?_csCart.helper.toFloat(c):0;break;default:e.customFields=[];if(_csCart.product.callbacks[a]&&typeof _csCart.product.callbacks[a]==='function'){t=!0;try{c=_csCart.product.callbacks[a](e);cs_debug&&console.info('[CartStack] csCart - @addProduct, Callback: @'+a+' return result: '+c)}catch(i){t=!1;cs_debug&&console.t$('[CartStack] csCart - @addProduct, Callback: @'+a+' exception!')};if(t&&c!==!1){let cfield={};cfield[a]=c;e.customFields.push(cfield)}} else{cs_debug&&console.error('[CartStack] csCart - @addProduct, Callback: @'+a+' was not registered!')}}});Object.keys(e).forEach(function(t){var c=t,a=e[t];if(a===!1)r.push(c)});t=(r.length===0)?!0:!1;if(t){var a=new _csCartItem(e);for(var c=0;c0&&console.log('[CartStack] csCart - @addProduct, Product not added... Missing info: '+this.helper.replaceAll('product','',r.toString()));r.length==0&&console.log('[CartStack] csCart - @addProduct, Product not added... Duplicated product: '+e.productName)}};this.product.item=!1;return t},setTotalPrice:function(t){var e=0;if((!_csCart.helper.isset(t,'string')||t=='')){if(this.products.length>0){cs_debug&&console.log('[CartStack] csCart - @setTotalPrice, Auto calculating total price...');for(var r=0;r0){e=_csCart.helper.toCurrency(String(e));_csCart.helper._cartstackSet('setCartTotal',String(e));cs_debug&&console.log('[CartStack] csCart - @setTotalPrice, Auto calculated total price: R$ '+e)} else cs_debug&&console.log('[CartStack] csCart - @setTotalPrice, No price given and no products with price!')} else cs_debug&&console.log('[CartStack] csCart - @setTotalPrice, No products to auto calculate total price!')} else{if(this.helper.toFloat(t)!=''){e=_csCart.helper.replaceAll('[^0-9.,]+','',t,'');_csCart.helper._cartstackSet('setCartTotal',String(e));cs_debug&&console.log('[CartStack] csCart - @setTotalPrice, Total price set: R$ '+e)} else{cs_debug&&console.log('[CartStack] csCart - @setTotalPrice, No price was given...');this.setTotalPrice()}}},saveCart:function(t){if(this.cartEvent==2){cs_debug&&console.log('[CartStack] csCart - @saveCart, Can\'t save cart! Cart already sent...');return!1};t=(typeof t==='undefined'||t===null)?!0:t;if(this.products.length>0){xe_createCookie('cartstack.com-cart',this.products.length,1);for(var e=0;e-1)return!0;return!1};_csCart.helper._cartstackSet('setDataItem',{'CartSession':'?utm_source=CartStack&utm_medium=Email&utm_campaign=CarrinhoAbandonado'});var done=!1;function cs_loadCart(){if(!done&&(typeof csForceCartMethod!='undefined')&&document.querySelector('div.vtex-minicart-2-x-minicartProductListContainer')!=null){cs_debug&&console.log('Method 1 forcedCart');var e=document.querySelectorAll('div.vtex-minicart-2-x-minicartProductListContainer'),r='',t=0;for(t;t0){cs_debug&&console.log('Method 1');var e=document.querySelector('div.vtex-minicart-2-x-minicartProductListContainer').querySelectorAll('div[class*="--cartSummary"].items-stretch'),r='',t=0;for(t;t0){_csCart.setTotalPrice(document.querySelector('span.total__value').innerText.split('R$').pop().trim())} else{_csCart.setTotalPrice()}};if(done){_csCart.saveCart(!1);_csCart.sendCart(!0)};csCartDone=!0};if(!done&&document.querySelector('div._cart-app-items')!=null){cs_debug&&console.log('Method 3');var e=document.querySelector('div._cart-app-items').querySelectorAll('div._cart-app-item'),r='',t=0;for(t;t
0){cs_debug&&console.log('Method 5 js');var e=document.querySelectorAll('div[class*="miniCartFlexContainer"] div[class*="miniCartFlexRow"]'),r='',t=0;for(t;t0){cs_debug&&console.log('Method 4');var e=jQuery('ul.cart-list').children('li'),r='',t=0;for(t;t0){cs_debug&&console.log('Method 5');var e=jQuery('div.cart-wrap-itens').find('ul[class*="item"]'),r='',t=0;for(t;t0){cs_debug&&console.log('Method 6');var e=jQuery('div.minicart-items div.minicart-items__item'),r='',t=0;for(t;t0){cs_debug&&console.log('Method 7');var e=jQuery('div.sta-cart-items ul li[data-id]'),r='',t=0;for(t;t0){cs_debug&&console.log('Method 8');var e=jQuery('div.cart__products').find('div.product__small'),r='',t=0;for(t;t0){cs_debug&&console.log('Method 9');var e=jQuery('div.t-minicart__content ul.t-minicart__items li.t-minicart__item-container'),r='',t=0;for(t;t0){cs_debug&&console.log('Method 10');var e=jQuery('div[class*="-products"]:eq(0) div[class*="-prodRow"]'),r='',t=0;for(t;t-1||document.body.classList.toString().indexOf('product')>-1||document.getElementById('Product')!=null||document.querySelector('div.render-route-store-product')!=null||window.location.href.toLowerCase().indexOf('/p')==window.location.href.length-2||window.location.href.toLowerCase().split('?sku')[0].indexOf('/p')==window.location.href.split('?sku')[0].length-2||(/\/p$/.test(window.location.href.split('?sku')[0])==!0))){var t=window.location.href.toLowerCase().split('/');if(typeof csPRONoXml=='undefined'){if(t.length>4){csPROHit('url*='+t[t.length-2])} else{csPROHit('url*='+t[t.length-1])}} else{csPROHit(((typeof cs_pro_extradata!='undefined')?cs_pro_extradata:''))};csProDone=!0;csCartDone=!1;csHome=!1};if(document.querySelector('div.vtex-minicart-2-x-minicartProductListContainer')!=null&&csCartDone==!1){window.setTimeout(function(){cs_debug&&console.log('Loading CsCart 1...');cs_loadCart();done=!1},2600)};if(document.querySelector('div._cart-app-items')!=null&&csCartDone==!1){if(document.querySelector('div._cart-app-items').querySelector('div._cart-app-item')!=null){window.setTimeout(function(){cs_debug&&console.log('Loading CsCart 2...');cs_loadCart();done=!1},2900)}};if(document.querySelector('div[class*="minicartProductListContainer"]')!=null&&csCartDone==!1){if(document.querySelector('div[class*="minicartProductListContainer"]').querySelector('div[class*="-minicart-product "]')!=null){window.setTimeout(function(){cs_debug&&console.log('Loading CsCart 2.5...');cs_loadCart();done=!1},2900)}};if(window.jQuery&&csCartDone==!1&&(document.querySelector('ul.cart-list')!=null||document.querySelector('div.cart-wrap-itens')!=null||document.querySelector('div.minicart-items div.minicart-items__item')!=null||document.querySelector('div.cart__products div.product__small')!=null)){window.setTimeout(function(){cs_debug&&console.log('Loading CsCart 3...');cs_loadCart();done=!1},3000)};if(window.jQuery&&csCartDone==!1&&(jQuery('div.sta-cart-items ul li[data-id]').length>0)){window.setTimeout(function(){cs_debug&&console.log('Loading CsCart 4...');cs_loadCart();done=!1},3000)};if(window.jQuery&&csCartDone==!1&&(jQuery('div.t-minicart__content ul.t-minicart__items li.t-minicart__item-container').length>0)){window.setTimeout(function(){cs_debug&&console.log('Loading CsCart 5...');cs_loadCart();done=!1},3000)};if(window.jQuery&&csCartDone==!1&&(jQuery('div[class*="-products"]:eq(0) div[class*="-prodRow"]').length>0)){window.setTimeout(function(){cs_debug&&console.log('Loading CsCart 7...');cs_loadCart();done=!1},3000)};if(csCartDone==!1&&(document.querySelectorAll('div[class*="miniCartFlexContainer"] div[class*="miniCartFlexRow"]').length>0)){window.setTimeout(function(){cs_debug&&console.log('Loading CsCart 6...');cs_loadCart();done=!1},3000)}}} else{cs_debug&&cs_console.log('Calling empty @getRefPolicy');cs_debug&&console.log('Reloading passing the window location and reseting cartstack vars...');_cartstack=[];function cs_getRefPolicy(t){t=(t&&typeof t!='undefined')?t:!1;var r=xex_cartstackbr.getProc().replace('auto',window.btoa(window.location.href))+((t)?'&store_id='+t:'')+'&ref_policy=true',c=document.getElementsByTagName('head')[0],e=document.createElement('script');e.src=r;c.appendChild(e);cs_ref_policy=!0;return!0};window.setTimeout(function(){var t=!1;cs_console.log('Reloading passing the window location...');cs_getRefPolicy(t)},1500)};cs_debug&&console.log('CartStack processing finished...');cartstackAPI.bReady=!0;